package pluginGenerator;

import java.util.Properties;

import org.apache.velocity.app.Velocity;
import org.apache.velocity.runtime.RuntimeConstants;

import ctxSemanticsGen.appDependent.VelocityInitializer;


/**
 * Velocity initializer for the JavaCtx Eclipse plugin.
 * This class gives Velocity a special resource manager which can load resources
 * from an Eclipse plugin.
 * 
 * @author guido
 *
 */
public class PluginVelocityInitializer implements VelocityInitializer {

	@Override
	public void initializeVelocity() {
		Properties prop = new Properties(); 
        
        prop.setProperty(RuntimeConstants.RESOURCE_LOADER, "myLoader");
        prop.setProperty("myLoader.resource.loader.class",
        		"pluginGenerator.PluginResourceLoader");
        Velocity.init(prop);
	}

}
